import React from "react";
import "./Tools.css";
import { Table } from "antd";

type Item = {
  name: string;
  onClick?: () => void;
};

interface ToolsProps {
  items: Item[];
}

const Tools: React.FC<ToolsProps> = ({ items }) => {
  return (
    <div className="tools-wrapper">
      {items.map((item: Item, index: number) => {
        return (
          <div key={index} className="tools-item" onClick={item.onClick}>
            {item.name}
          </div>
        );
      })}
    </div>
  );
};

export default Tools;
